
import java.sql.PreparedStatement
import org.springframework.expression.spel.standard.SpelExpressionParser
import org.springframework.expression.ExpressionParser

println PreparedStatement.class.getSimpleName();
println PreparedStatement.class.getName();

ExpressionParser parser = new SpelExpressionParser();
def exp = parser.parseExpression("'Hello World'.concat('!')");
String message = (String) exp.getValue();
println message;

exp = parser.parseExpression("'Hello World'.concat('!').toUpperCase()");
message = exp.getValue(String.class);
println message;


exp = parser.parseExpression("'Hello World'.concat('!').length()");
message = (String) exp.getValue();
println message;

exp = parser.parseExpression("'Hello World'.concat('!').bytes.length");
int result = exp.getValue(Integer.class);
println result;

int[] numbers2 = (int[]) parser.parseExpression("new int[]{1,2,3}").getValue();
println numbers2
println numbers2[0];





